/**
 * Copyright © 2020 易久批信息技术有限公司. All rights reserved.
 */
package com.dysm.chainofresp;

/**
 * 责任链模式
 * @author xiay
 * @since 2020/12/13 8:45 下午
 */
public class ChainOfRespClient {

    public static void main(String[] args) {
        Leader director = new Director("张三");

        Leader manager = new Manager("李四");

        Leader generalManager = new GeneralManager("王总");

        director.setNextLeader(manager);
        manager.setNextLeader(generalManager);

        LeaveRequest request = new LeaveRequest("小莉", 49, "回家结婚");
        director.handleLeave(request);
    }
}
